<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>跳转提示</title>
    <style>
        * { margin: 0px; padding: 0px; font-family: "Microsoft Yahei"; font-weight: 200; }
        body { background-color: #fbfbfb; }
        a { color: #333; }
        .box {
            width: 100%; height: auto; background-color: #fff;
        }
        .copyright {
            float: left; width: 100%; height: 200px; background-color: #16987e; text-align: center;
            color: #fff; font-size: 49px;
        }
        .alert-box {
            position: absolute; top: 120px; left: 50%; z-index: 11; width: 666px; height: 260px;
            background-color: #fff; margin-left: -333px; border-radius: 5px; border: 2px dashed #eee;
            padding-top: 100px; text-align: center; overflow: hidden; font-size: 24px;
        }
        .c-red { color: red; font-weight: 400; }
        .c-green { color: green; font-weight: 400; }
    </style>
</head>
<body>

    <div class="box">
        <div class="copyright">
            <p style="line-height: 100px;">Wefee.</p>
        </div>
        <div class="alert-box">
            <p class="<?php echo $code == 1 ? 'c-green' : 'c-red' ?>"><?php echo(strip_tags($msg));?></p>

            <p style="color: #bbb; font-size: 14px; margin-top: 30px;">页面自动 <a id="href" href="<?php echo($url);?>">跳转</a> 等待时间： <b id="wait"><?php echo($wait);?></b></p>
        </div>
    </div>

    <script type="text/javascript">
        (function(){
            var wait = document.getElementById('wait'),
                    href = document.getElementById('href').href;
            var interval = setInterval(function(){
                var time = --wait.innerHTML;
                if(time <= 0) {
                    location.href = href;
                    clearInterval(interval);
                };
            }, 1000);
        })();
    </script>
</body>
</html>